package com.demoworld.services.factory;

import com.demoworld.services.flow.BaseFlow;
import com.demoworld.services.flow.FlowOne;
import org.springframework.stereotype.Component;
import org.springframework.web.context.ContextLoader;

/**
 * Created by li_wb on 2018/1/8.
 */
@Component
public class TestFactory {
    public BaseFlow getFlow() {
        FlowOne flowOne = ContextLoader.getCurrentWebApplicationContext().getBean(FlowOne.class);
        flowOne.initialize();
        return flowOne;
    }
}
